/*
* @Author: Choisaaaa
* @Date: 2018/5/5  20:36
* 组件的组合方式2：容器示组件
*/


import React from  "react";
import ReactDOM from 'react-dom';



class Title extends React.Component{
    constructor(props){
        super(props);
    }
    render(){
        return <div>{this.props.children}</div>
    }
}
class ES6Component2 extends React.Component {
    render() {
        return (
            <div>
                <Title >
                    <h1>这里是ES6Component2</h1>
                    <p>容器是组件：this.props.children</p>
                </Title>
                <hr/>
            </div>
        );
    }
}

ReactDOM.render(
    <div>
        <ES6Component2 />
    </div>,
    document.getElementById("Study")
);